<ng-template #suffixTemplate>
  <i 
    nz-icon 
    nz-tooltip 
    class="ant-input-clear-icon" 
    nzTheme="fill" 
    nzType="close-circle" 
    *ngIf="searchtext"
    (click)="change('')"></i>
</ng-template>

<ng-template #suffixIconButton>
  <i *ngIf="!isLoad" nz-icon nzType="search" (click)="onclick(grsy.value)"></i>
  <i *ngIf="isLoad" nz-icon nzType="loading" class="loading-icon"></i>
</ng-template>

<nz-autocomplete nzBackfill #auto>
  <ng-container *ngFor="let option of options">
    <nz-auto-option [nzValue]="option.AKB001" [nzLabel]="option.AKB002">{{ option.AKB002 }}
    </nz-auto-option>
  </ng-container>
</nz-autocomplete>

<nz-input-group nzCompact [nzSuffix]="suffixTemplate" [nzAddOnAfter]="suffixIconButton">
  <input type="hidden" nz-input [(ngModel)]="searchtext" />
  <input 
    type="text" 
    nz-input 
    #grsy 
    type="text" 
    nz-input 
    [(ngModel)]="searchtext" 
    (keyup)="onInput($event,grsy.value)"
    placeholder="输入分院编号或者分院名称关键字" 
    (ngModelChange)="change($event)" 
    [nzAutocomplete]="auto" />
</nz-input-group>
